﻿namespace AspNetCore.Host.Routing
{
    public class HttpMethodAttribute: Attribute
    {
        public string Template { get;  }
        public string? Method { get; }

        public HttpMethodAttribute(string template, string method)
        {
            Template = template;
            Method = method;
        }
        public HttpMethodAttribute(string template)
        {
            Template = template;
        }
    }
    public class HttpGetAttribute : HttpMethodAttribute
    {
        public HttpGetAttribute(string template)
            :base(template,HttpMethods.Get)
        {
        }
    }
    public class HttpPostAttribute : HttpMethodAttribute
    {
        public HttpPostAttribute(string template)
            : base(template, HttpMethods.Post)
        {

        }
    }
}
